import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'layout',
    redirect:'/home',
    component: () => import(/* webpackChunkName: "about" */ '@/views/layout/indexView.vue'),
    children:[{
      path: '/',
      name: 'home',
      component: () => import(/* webpackChunkName: "about" */ '@/views/home/indexView.vue')
    },{
      path: '/home',
      name: 'home',
      component: () => import(/* webpackChunkName: "about" */ '@/views/home/indexView.vue')
    },{
      path: '/list',
      name: 'list',
      component: () => import(/* webpackChunkName: "about" */ '@/views/list/indexView.vue')
    },{
      path: '/user',
      name: 'user',
      component: () => import(/* webpackChunkName: "about" */ '@/views/user/indexView.vue')
    }]
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
